﻿///////////////////////////////////////////////////////////////////////////////
//
//  This file is part of MathLib.NET.
//
//  This library is free software; you can redistribute it and/or
//  modify it under the terms of the GNU Lesser General Public
//  License as published by the Free Software Foundation; either
//  version 2.1 of the License, or (at your option) any later version.
//  
//  This library is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//  Lesser General Public License for more details.
//  
//  You should have received a copy of the GNU Lesser General Public
//  License along with this library;  If not, see 
//  <http://www.gnu.org/licenses/>.
//
///////////////////////////////////////////////////////////////////////////////

using System;
using ILNumerics;
using ILNumerics.BuiltInFunctions;

// Trigonometric Functions
// =======================
//
// acos - Inverse cosine; result in radians 
// acosd - Inverse cosine; result in degrees 
// acosh - Inverse hyperbolic cosine 
// acot - Inverse cotangent; result in radians 
// acotd - Inverse cotangent; result in degrees 
// acoth - Inverse hyperbolic cotangent 
// acsc - Inverse cosecant; result in radians 
// acscd - Inverse cosecant; result in degrees 
// acsch - Inverse hyperbolic cosecant 
// asec - Inverse secant; result in radians 
// asecd - Inverse secant; result in degrees 
// asech - Inverse hyperbolic secant 
// asin - Inverse sine; result in radians 
// asind - Inverse sine; result in degrees 
// asinh - Inverse hyperbolic sine 
// atan - Inverse tangent; result in radians 
// atan2 - Four-quadrant inverse tangent 
// atand - Inverse tangent; result in degrees 
// atanh - Inverse hyperbolic tangent 
// cos - Cosine of argument in radians 
// cosd - Cosine of argument in degrees 
// cosh - Hyperbolic cosine 
// cot - Cotangent of argument in radians 
// cotd - Cotangent of argument in degrees 
// coth - Hyperbolic cotangent 
// csc - Cosecant of argument in radians 
// cscd - Cosecant of argument in degrees 
// csch - Hyperbolic cosecant 
// hypot - Square root of sum of squares 
// sec - Secant of argument in radians 
// secd - Secant of argument in degrees 
// sech - Hyperbolic secant 
// sin - Sine of argument in radians 
// sind - Sine of argument in degrees 
// sinh - Hyperbolic sine of argument in radians 
// tan - Tangent of argument in radians 
// tand - Tangent of argument in degrees 
// tanh - Hyperbolic tangent 


namespace MathLib
{
    /// <summary>
    /// Implements trigonometric functions not provided by ILNumerics.
    /// </summary>
    public partial class MLMath
    {
        //
        // --- Inverse cosine ---
        //

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<double> acos(ILArray<double> arg)
        {
            return ILMath.acos(arg);
        }

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<float> acos(ILArray<float> arg)
        {
            return ILMath.acos(arg);
        }

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<complex> acos(ILArray<complex> arg)
        {
            return ILMath.acos(arg);
        }

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<fcomplex> acos(ILArray<fcomplex> arg)
        {
            return ILMath.acos(arg);
        }

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<double> acos(ILArray<int> arg)
        {
            return ILMath.acos(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<double> acos(ILArray<byte> arg)
        {
            return ILMath.acos(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<double> acos(ILArray<char> arg)
        {
            return ILMath.acos(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<double> acos(ILArray<long> arg)
        {
            return ILMath.acos(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<double> acos(ILArray<short> arg)
        {
            return ILMath.acos(ILMath.todouble(arg));
        }


        //
        // --- Inverse cosine (result in degrees) ---
        //

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<double> acosd(ILArray<double> arg)
        {
            return ILMath.acos(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<float> acosd(ILArray<float> arg)
        {
            return ILMath.acos(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<double> acosd(ILArray<int> arg)
        {
            return ILMath.acos(ILMath.todouble(arg)) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<complex> acosd(ILArray<complex> arg)
        {
            return ILMath.acos(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<fcomplex> acosd(ILArray<fcomplex> arg)
        {
            return ILMath.acos(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<double> acosd(ILArray<byte> arg)
        {
            return ILMath.acos(ILMath.todouble(arg)) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<double> acosd(ILArray<char> arg)
        {
            return ILMath.acos(ILMath.todouble(arg)) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<double> acosd(ILArray<long> arg)
        {
            return ILMath.acos(ILMath.todouble(arg)) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosine of</param>
        /// <returns>Inverse cosine of argument</returns>
        public static ILArray<double> acosd(ILArray<short> arg)
        {
            return ILMath.acos(ILMath.todouble(arg)) * (180.0 / MLMath.pi);
        }


        //
        // --- Inverse cotangent (result in degrees) ---
        //

        /// <summary>
        /// Inverse cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse cotangent of</param>
        /// <returns>Inverse cotangent of argument</returns>
        public static ILArray<double> acotd(ILArray<double> arg)
        {
            return acot(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse cotangent of</param>
        /// <returns>Inverse cotangent of argument</returns>
        public static ILArray<float> acotd(ILArray<float> arg)
        {
            return acot(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse cotangent of</param>
        /// <returns>Inverse cotangent of argument</returns>
        public static ILArray<double> acotd(ILArray<int> arg)
        {
            return acot(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse cotangent of</param>
        /// <returns>Inverse cotangent of argument</returns>
        public static ILArray<complex> acotd(ILArray<complex> arg)
        {
            return acot(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse cotangent of</param>
        /// <returns>Inverse cotangent of argument</returns>
        public static ILArray<fcomplex> acotd(ILArray<fcomplex> arg)
        {
            return acot(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse cotangent of</param>
        /// <returns>Inverse cotangent of argument</returns>
        public static ILArray<double> acotd(ILArray<byte> arg)
        {
            return acot(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse cotangent of</param>
        /// <returns>Inverse cotangent of argument</returns>
        public static ILArray<double> acotd(ILArray<char> arg)
        {
            return acot(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse cotangent of</param>
        /// <returns>Inverse cotangent of argument</returns>
        public static ILArray<double> acotd(ILArray<long> arg)
        {
            return acot(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse cotangent of</param>
        /// <returns>Inverse cotangent of argument</returns>
        public static ILArray<double> acotd(ILArray<short> arg)
        {
            return acot(arg) * (180.0 / MLMath.pi);
        }


        //
        // --- Inverse cosecant (result in degrees) ---
        //

        /// <summary>
        /// Inverse cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosecant of</param>
        /// <returns>Inverse cosecant of argument</returns>
        public static ILArray<double> acscd(ILArray<double> arg)
        {
            return acsc(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosecant of</param>
        /// <returns>Inverse cosecant of argument</returns>
        public static ILArray<float> acscd(ILArray<float> arg)
        {
            return acsc(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosecant of</param>
        /// <returns>Inverse cosecant of argument</returns>
        public static ILArray<double> acscd(ILArray<int> arg)
        {
            return acsc(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosecant of</param>
        /// <returns>Inverse cosecant of argument</returns>
        public static ILArray<complex> acscd(ILArray<complex> arg)
        {
            return acsc(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosecant of</param>
        /// <returns>Inverse cosecant of argument</returns>
        public static ILArray<fcomplex> acscd(ILArray<fcomplex> arg)
        {
            return acsc(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosecant of</param>
        /// <returns>Inverse cosecant of argument</returns>
        public static ILArray<double> acscd(ILArray<byte> arg)
        {
            return acsc(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosecant of</param>
        /// <returns>Inverse cosecant of argument</returns>
        public static ILArray<double> acscd(ILArray<char> arg)
        {
            return acsc(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosecant of</param>
        /// <returns>Inverse cosecant of argument</returns>
        public static ILArray<double> acscd(ILArray<long> arg)
        {
            return acsc(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosecant of</param>
        /// <returns>Inverse cosecant of argument</returns>
        public static ILArray<double> acscd(ILArray<short> arg)
        {
            return acsc(arg) * (180.0 / MLMath.pi);
        }


        //
        // --- Inverse secant (result in degrees) ---
        //

        /// <summary>
        /// Inverse secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse secant of</param>
        /// <returns>Inverse secant of argument</returns>
        public static ILArray<double> asecd(ILArray<double> arg)
        {
            return asec(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse secant of</param>
        /// <returns>Inverse secant of argument</returns>
        public static ILArray<float> asecd(ILArray<float> arg)
        {
            return asec(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse secant of</param>
        /// <returns>Inverse secant of argument</returns>
        public static ILArray<double> asecd(ILArray<int> arg)
        {
            return asec(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse secant of</param>
        /// <returns>Inverse secant of argument</returns>
        public static ILArray<complex> asecd(ILArray<complex> arg)
        {
            return asec(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse secant of</param>
        /// <returns>Inverse secant of argument</returns>
        public static ILArray<fcomplex> asecd(ILArray<fcomplex> arg)
        {
            return asec(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse secant of</param>
        /// <returns>Inverse secant of argument</returns>
        public static ILArray<double> asecd(ILArray<byte> arg)
        {
            return asec(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse secant of</param>
        /// <returns>Inverse secant of argument</returns>
        public static ILArray<double> asecd(ILArray<char> arg)
        {
            return asec(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse secant of</param>
        /// <returns>Inverse secant of argument</returns>
        public static ILArray<double> asecd(ILArray<long> arg)
        {
            return asec(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse secant of</param>
        /// <returns>Inverse secant of argument</returns>
        public static ILArray<double> asecd(ILArray<short> arg)
        {
            return asec(arg) * (180.0 / MLMath.pi);
        }


        //
        // --- Inverse sine ---
        //

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<double> asin(ILArray<double> arg)
        {
            return ILMath.asin(arg);
        }

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<float> asin(ILArray<float> arg)
        {
            return ILMath.asin(arg);
        }

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<double> asin(ILArray<int> arg)
        {
            return ILMath.asin(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<complex> asin(ILArray<complex> arg)
        {
            return ILMath.asin(arg);
        }

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<fcomplex> asin(ILArray<fcomplex> arg)
        {
            return ILMath.asin(arg);
        }

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<double> asin(ILArray<byte> arg)
        {
            return ILMath.asin(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<double> asin(ILArray<char> arg)
        {
            return ILMath.asin(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<double> asin(ILArray<long> arg)
        {
            return ILMath.asin(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<double> asin(ILArray<short> arg)
        {
            return ILMath.asin(ILMath.todouble(arg));
        }


        //
        // --- Inverse sine (result in degrees) ---
        //

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<double> asind(ILArray<double> arg)
        {
            return asin(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<float> asind(ILArray<float> arg)
        {
            return asin(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<double> asind(ILArray<int> arg)
        {
            return asin(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<complex> asind(ILArray<complex> arg)
        {
            return asin(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<fcomplex> asind(ILArray<fcomplex> arg)
        {
            return asin(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<double> asind(ILArray<byte> arg)
        {
            return asin(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<double> asind(ILArray<char> arg)
        {
            return asin(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<double> asind(ILArray<long> arg)
        {
            return asin(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse sine of</param>
        /// <returns>Inverse sine of argument</returns>
        public static ILArray<double> asind(ILArray<short> arg)
        {
            return asin(arg) * (180.0 / MLMath.pi);
        }


        //
        // --- Sine ---
        //

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<double> sin(ILArray<double> arg)
        {
            return ILMath.sin(arg);
        }

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<float> sin(ILArray<float> arg)
        {
            return ILMath.sin(arg);
        }

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<double> sin(ILArray<int> arg)
        {
            return ILMath.sin(ILMath.todouble(arg));
        }

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<complex> sin(ILArray<complex> arg)
        {
            return ILMath.sin(arg);
        }

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<fcomplex> sin(ILArray<fcomplex> arg)
        {
            return ILMath.sin(arg);
        }

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<double> sin(ILArray<byte> arg)
        {
            return ILMath.sin(ILMath.todouble(arg));
        }

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<double> sin(ILArray<char> arg)
        {
            return ILMath.sin(ILMath.todouble(arg));
        }

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<double> sin(ILArray<long> arg)
        {
            return ILMath.sin(ILMath.todouble(arg));
        }

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<double> sin(ILArray<short> arg)
        {
            return ILMath.sin(ILMath.todouble(arg));
        }


        //
        // --- Sine (argument in degrees) ---
        //

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<double> sind(ILArray<double> arg)
        {
            return sin(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<float> sind(ILArray<float> arg)
        {
            return sin(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<double> sind(ILArray<int> arg)
        {
            return sin(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<complex> sind(ILArray<complex> arg)
        {
            return sin(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<fcomplex> sind(ILArray<fcomplex> arg)
        {
            return sin(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<double> sind(ILArray<byte> arg)
        {
            return sin(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<double> sind(ILArray<char> arg)
        {
            return sin(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<double> sind(ILArray<long> arg)
        {
            return sin(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Sine.
        /// </summary>
        /// <param name="arg">Argument to return sine of</param>
        /// <returns>Sine of argument</returns>
        public static ILArray<double> sind(ILArray<short> arg)
        {
            return sin(arg * MLMath.pi / 180.0);
        }


        //
        // --- Hyperbolic sine ---
        //

        /// <summary>
        /// Hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic sine of</param>
        /// <returns>Hyperbolic sine of argument</returns>
        public static ILArray<double> sinh(ILArray<double> arg)
        {
            return ILMath.sinh(arg);
        }

        /// <summary>
        /// Hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic sine of</param>
        /// <returns>Hyperbolic sine of argument</returns>
        public static ILArray<float> sinh(ILArray<float> arg)
        {
            return ILMath.sinh(arg);
        }

        /// <summary>
        /// Hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic sine of</param>
        /// <returns>Hyperbolic sine of argument</returns>
        public static ILArray<double> sinh(ILArray<int> arg)
        {
            return ILMath.sinh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic sine of</param>
        /// <returns>Hyperbolic sine of argument</returns>
        public static ILArray<complex> sinh(ILArray<complex> arg)
        {
            return ILMath.sinh(arg);
        }

        /// <summary>
        /// Hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic sine of</param>
        /// <returns>Hyperbolic sine of argument</returns>
        public static ILArray<fcomplex> sinh(ILArray<fcomplex> arg)
        {
            return ILMath.sinh(arg);
        }

        /// <summary>
        /// Hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic sine of</param>
        /// <returns>Hyperbolic sine of argument</returns>
        public static ILArray<double> sinh(ILArray<byte> arg)
        {
            return ILMath.sinh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic sine of</param>
        /// <returns>Hyperbolic sine of argument</returns>
        public static ILArray<double> sinh(ILArray<char> arg)
        {
            return ILMath.sinh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic sine of</param>
        /// <returns>Hyperbolic sine of argument</returns>
        public static ILArray<double> sinh(ILArray<long> arg)
        {
            return ILMath.sinh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic sine of</param>
        /// <returns>Hyperbolic sine of argument</returns>
        public static ILArray<double> sinh(ILArray<short> arg)
        {
            return ILMath.sinh(ILMath.todouble(arg));
        }


        //
        // --- Inverse tangent ---
        //

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<double> atan(ILArray<double> arg)
        {
            return ILMath.atan(arg);
        }

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<float> atan(ILArray<float> arg)
        {
            return ILMath.atan(arg);
        }

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<double> atan(ILArray<int> arg)
        {
            return ILMath.atan(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<complex> atan(ILArray<complex> arg)
        {
            return ILMath.atan(arg);
        }

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<fcomplex> atan(ILArray<fcomplex> arg)
        {
            return ILMath.atan(arg);
        }

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<double> atan(ILArray<byte> arg)
        {
            return ILMath.atan(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<double> atan(ILArray<char> arg)
        {
            return ILMath.atan(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<double> atan(ILArray<long> arg)
        {
            return ILMath.atan(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<double> atan(ILArray<short> arg)
        {
            return ILMath.atan(ILMath.todouble(arg));
        }


        //
        // --- Inverse tangent (result in degrees) ---
        //

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<double> atand(ILArray<double> arg)
        {
            return atan(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<float> atand(ILArray<float> arg)
        {
            return atan(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<double> atand(ILArray<int> arg)
        {
            return atan(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<complex> atand(ILArray<complex> arg)
        {
            return atan(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<fcomplex> atand(ILArray<fcomplex> arg)
        {
            return atan(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<double> atand(ILArray<byte> arg)
        {
            return atan(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<double> atand(ILArray<char> arg)
        {
            return atan(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<double> atand(ILArray<long> arg)
        {
            return atan(arg) * (180.0 / MLMath.pi);
        }

        /// <summary>
        /// Inverse tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse tangent of</param>
        /// <returns>Inverse tangent of argument</returns>
        public static ILArray<double> atand(ILArray<short> arg)
        {
            return atan(arg) * (180.0 / MLMath.pi);
        }


        //
        // --- Tangent ---
        //

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<double> tan(ILArray<double> arg)
        {
            return ILMath.tan(arg);
        }

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<float> tan(ILArray<float> arg)
        {
            return ILMath.tan(arg);
        }

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<double> tan(ILArray<int> arg)
        {
            return ILMath.tan(ILMath.todouble(arg));
        }

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<complex> tan(ILArray<complex> arg)
        {
            return ILMath.tan(arg);
        }

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<fcomplex> tan(ILArray<fcomplex> arg)
        {
            return ILMath.tan(arg);
        }

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<double> tan(ILArray<byte> arg)
        {
            return ILMath.tan(ILMath.todouble(arg));
        }

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<double> tan(ILArray<char> arg)
        {
            return ILMath.tan(ILMath.todouble(arg));
        }

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<double> tan(ILArray<long> arg)
        {
            return ILMath.tan(ILMath.todouble(arg));
        }

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<double> tan(ILArray<short> arg)
        {
            return ILMath.tan(ILMath.todouble(arg));
        }


        //
        // --- Tangent (argument in degrees) ---
        //

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<double> tand(ILArray<double> arg)
        {
            return tan(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<float> tand(ILArray<float> arg)
        {
            return tan(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<double> tand(ILArray<int> arg)
        {
            return tan(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<complex> tand(ILArray<complex> arg)
        {
            return tan(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<fcomplex> tand(ILArray<fcomplex> arg)
        {
            return tan(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<double> tand(ILArray<byte> arg)
        {
            return tan(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<double> tand(ILArray<char> arg)
        {
            return tan(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<double> tand(ILArray<long> arg)
        {
            return tan(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Tangent.
        /// </summary>
        /// <param name="arg">Argument to return tangent of</param>
        /// <returns>Tangent of argument</returns>
        public static ILArray<double> tand(ILArray<short> arg)
        {
            return tan(arg * MLMath.pi / 180.0);
        }


        //
        // --- Hyperbolic tangent ---
        //

        /// <summary>
        /// Hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic tangent of</param>
        /// <returns>Hyperbolic tangent of argument</returns>
        public static ILArray<double> tanh(ILArray<double> arg)
        {
            return ILMath.tanh(arg);
        }

        /// <summary>
        /// Hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic tangent of</param>
        /// <returns>Hyperbolic tangent of argument</returns>
        public static ILArray<float> tanh(ILArray<float> arg)
        {
            return ILMath.tanh(arg);
        }

        /// <summary>
        /// Hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic tangent of</param>
        /// <returns>Hyperbolic tangent of argument</returns>
        public static ILArray<double> tanh(ILArray<int> arg)
        {
            return ILMath.tanh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic tangent of</param>
        /// <returns>Hyperbolic tangent of argument</returns>
        public static ILArray<complex> tanh(ILArray<complex> arg)
        {
            return ILMath.tanh(arg);
        }

        /// <summary>
        /// Hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic tangent of</param>
        /// <returns>Hyperbolic tangent of argument</returns>
        public static ILArray<fcomplex> tanh(ILArray<fcomplex> arg)
        {
            return ILMath.tanh(arg);
        }

        /// <summary>
        /// Hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic tangent of</param>
        /// <returns>Hyperbolic tangent of argument</returns>
        public static ILArray<double> tanh(ILArray<byte> arg)
        {
            return ILMath.tanh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic tangent of</param>
        /// <returns>Hyperbolic tangent of argument</returns>
        public static ILArray<double> tanh(ILArray<char> arg)
        {
            return ILMath.tanh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic tangent of</param>
        /// <returns>Hyperbolic tangent of argument</returns>
        public static ILArray<double> tanh(ILArray<long> arg)
        {
            return ILMath.tanh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic tangent of</param>
        /// <returns>Hyperbolic tangent of argument</returns>
        public static ILArray<double> tanh(ILArray<short> arg)
        {
            return ILMath.tanh(ILMath.todouble(arg));
        }


        //
        // --- Four-quadrant inverse tangent ---
        //

        /// <summary>
        /// Four-quadrant inverse tangent.
        /// </summary>
        /// <param name="opp">Opposite side to angle</param>
        /// <param name="adj">Adjacent side to angle</param>
        /// <returns>Four-quadrant angle given opposite and adjacent side lengths</returns>
        public static ILArray<double> atan2(ILArray<double> opp, ILArray<double> adj)
        {
            // ILMath.atan2() does not return the same results as c# and MATLAB.
            ILArray<double> outArray = new ILArray<double>(opp.Dimensions.ToIntArray());

            for (int i = 0; i < opp.InternalArray4Experts.Length; i++)
            {
                outArray.InternalArray4Experts[i] = Math.Atan2(opp.InternalArray4Experts[i],
                                                               adj.InternalArray4Experts[i]);
            }

            return outArray;
        }

        /// <summary>
        /// Four-quadrant inverse tangent.
        /// </summary>
        /// <param name="opp">Opposite side to angle</param>
        /// <param name="adj">Adjacent side to angle</param>
        /// <returns>Four-quadrant angle given opposite and adjacent side lengths</returns>
        public static ILArray<double> atan2(ILArray<double> opp, ILBaseArray adj)
        {
            return ILMath.atan2(opp, ILMath.todouble(adj));
        }

        /// <summary>
        /// Four-quadrant inverse tangent.
        /// </summary>
        /// <param name="opp">Opposite side to angle</param>
        /// <param name="adj">Adjacent side to angle</param>
        /// <returns>Four-quadrant angle given opposite and adjacent side lengths</returns>
        public static ILArray<float> atan2(ILArray<float> opp, ILBaseArray adj)
        {
            return ILMath.tosingle(ILMath.atan2(ILMath.todouble(opp), ILMath.todouble(adj)));
        }

        /// <summary>
        /// Four-quadrant inverse tangent.
        /// </summary>
        /// <param name="opp">Opposite side to angle</param>
        /// <param name="adj">Adjacent side to angle</param>
        /// <returns>Four-quadrant angle given opposite and adjacent side lengths</returns>
        public static ILArray<double> atan2(ILArray<int> opp, ILBaseArray adj)
        {
            return ILMath.atan2(ILMath.todouble(opp), ILMath.todouble(adj));
        }

        /// <summary>
        /// Four-quadrant inverse tangent.
        /// </summary>
        /// <param name="opp">Opposite side to angle</param>
        /// <param name="adj">Adjacent side to angle</param>
        /// <returns>Four-quadrant angle given opposite and adjacent side lengths</returns>
        public static ILArray<double> atan2(ILArray<complex> opp, ILBaseArray adj)
        {
            return ILMath.atan2(ILMath.todouble(opp), ILMath.todouble(adj));
        }

        /// <summary>
        /// Four-quadrant inverse tangent.
        /// </summary>
        /// <param name="opp">Opposite side to angle</param>
        /// <param name="adj">Adjacent side to angle</param>
        /// <returns>Four-quadrant angle given opposite and adjacent side lengths</returns>
        public static ILArray<float> atan2(ILArray<fcomplex> opp, ILBaseArray adj)
        {
            return ILMath.tosingle(ILMath.atan2(ILMath.todouble(opp), ILMath.todouble(adj)));
        }

        /// <summary>
        /// Four-quadrant inverse tangent.
        /// </summary>
        /// <param name="opp">Opposite side to angle</param>
        /// <param name="adj">Adjacent side to angle</param>
        /// <returns>Four-quadrant angle given opposite and adjacent side lengths</returns>
        public static ILArray<double> atan2(ILArray<byte> opp, ILBaseArray adj)
        {
            return ILMath.atan2(ILMath.todouble(opp), ILMath.todouble(adj));
        }

        /// <summary>
        /// Four-quadrant inverse tangent.
        /// </summary>
        /// <param name="opp">Opposite side to angle</param>
        /// <param name="adj">Adjacent side to angle</param>
        /// <returns>Four-quadrant angle given opposite and adjacent side lengths</returns>
        public static ILArray<double> atan2(ILArray<char> opp, ILBaseArray adj)
        {
            return ILMath.atan2(ILMath.todouble(opp), ILMath.todouble(adj));
        }

        /// <summary>
        /// Four-quadrant inverse tangent.
        /// </summary>
        /// <param name="opp">Opposite side to angle</param>
        /// <param name="adj">Adjacent side to angle</param>
        /// <returns>Four-quadrant angle given opposite and adjacent side lengths</returns>
        public static ILArray<double> atan2(ILArray<long> opp, ILBaseArray adj)
        {
            return ILMath.atan2(ILMath.todouble(opp), ILMath.todouble(adj));
        }

        /// <summary>
        /// Four-quadrant inverse tangent.
        /// </summary>
        /// <param name="opp">Opposite side to angle</param>
        /// <param name="adj">Adjacent side to angle</param>
        /// <returns>Four-quadrant angle given opposite and adjacent side lengths</returns>
        public static ILArray<double> atan2(ILArray<short> opp, ILBaseArray adj)
        {
            return ILMath.atan2(ILMath.todouble(opp), ILMath.todouble(adj));
        }


        //
        // --- Cosine ---
        //

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<double> cos(ILArray<double> arg)
        {
            return ILMath.cos(arg);
        }

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<float> cos(ILArray<float> arg)
        {
            return ILMath.cos(arg);
        }

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<complex> cos(ILArray<complex> arg)
        {
            return ILMath.cos(arg);
        }

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<fcomplex> cos(ILArray<fcomplex> arg)
        {
            return ILMath.cos(arg);
        }

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<double> cos(ILArray<int> arg)
        {
            return ILMath.cos(ILMath.todouble(arg));
        }

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<double> cos(ILArray<byte> arg)
        {
            return ILMath.cos(ILMath.todouble(arg));
        }

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<double> cos(ILArray<char> arg)
        {
            return ILMath.cos(ILMath.todouble(arg));
        }

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<double> cos(ILArray<long> arg)
        {
            return ILMath.cos(ILMath.todouble(arg));
        }

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<double> cos(ILArray<short> arg)
        {
            return ILMath.cos(ILMath.todouble(arg));
        }


        //
        // --- Cosine (argument in degrees) ---
        //

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<double> cosd(ILArray<double> arg)
        {
            return cos(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<float> cosd(ILArray<float> arg)
        {
            return cos(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<double> cosd(ILArray<int> arg)
        {
            return cos(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<complex> cosd(ILArray<complex> arg)
        {
            return cos(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<fcomplex> cosd(ILArray<fcomplex> arg)
        {
            return cos(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<double> cosd(ILArray<byte> arg)
        {
            return cos(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<double> cosd(ILArray<char> arg)
        {
            return cos(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<double> cosd(ILArray<long> arg)
        {
            return cos(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cosine.
        /// </summary>
        /// <param name="arg">Argument to return cosine of</param>
        /// <returns>Cosine of argument</returns>
        public static ILArray<double> cosd(ILArray<short> arg)
        {
            return cos(arg * MLMath.pi / 180.0);
        }


        //
        // --- Hyperbolic cosine ---
        //

        /// <summary>
        /// Hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosine of</param>
        /// <returns>Hyperbolic cosine of argument</returns>
        public static ILArray<double> cosh(ILArray<double> arg)
        {
            return ILMath.cosh(arg);
        }

        /// <summary>
        /// Hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosine of</param>
        /// <returns>Hyperbolic cosine of argument</returns>
        public static ILArray<float> cosh(ILArray<float> arg)
        {
            return ILMath.cosh(arg);
        }

        /// <summary>
        /// Hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosine of</param>
        /// <returns>Hyperbolic cosine of argument</returns>
        public static ILArray<double> cosh(ILArray<int> arg)
        {
            return ILMath.cosh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosine of</param>
        /// <returns>Hyperbolic cosine of argument</returns>
        public static ILArray<complex> cosh(ILArray<complex> arg)
        {
            return ILMath.cosh(arg);
        }

        /// <summary>
        /// Hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosine of</param>
        /// <returns>Hyperbolic cosine of argument</returns>
        public static ILArray<fcomplex> cosh(ILArray<fcomplex> arg)
        {
            return ILMath.cosh(arg);
        }

        /// <summary>
        /// Hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosine of</param>
        /// <returns>Hyperbolic cosine of argument</returns>
        public static ILArray<double> cosh(ILArray<byte> arg)
        {
            return ILMath.cosh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosine of</param>
        /// <returns>Hyperbolic cosine of argument</returns>
        public static ILArray<double> cosh(ILArray<char> arg)
        {
            return ILMath.cosh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosine of</param>
        /// <returns>Hyperbolic cosine of argument</returns>
        public static ILArray<double> cosh(ILArray<long> arg)
        {
            return ILMath.cosh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosine of</param>
        /// <returns>Hyperbolic cosine of argument</returns>
        public static ILArray<double> cosh(ILArray<short> arg)
        {
            return ILMath.cosh(ILMath.todouble(arg));
        }


        //
        // --- Secant ---
        //

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<double> sec(ILArray<double> angle)
        {
            ILArray<double> secArray = ILNumerics.BuiltInFunctions.ILMath.cos(angle);

            for (int i = 0; i < secArray.InternalArray4Experts.Length; i++)
                secArray.InternalArray4Experts[i] = 1.0 / secArray.InternalArray4Experts[i];

            return secArray;
        }

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<complex> sec(ILArray<complex> angle)
        {
            ILArray<complex> secArray = ILNumerics.BuiltInFunctions.ILMath.cos(angle);

            for (int i = 0; i < secArray.InternalArray4Experts.Length; i++)
                secArray.InternalArray4Experts[i] = 1.0 / secArray.InternalArray4Experts[i];

            return secArray;
        }

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<float> sec(ILArray<float> angle)
        {
            ILArray<float> secArray = ILNumerics.BuiltInFunctions.ILMath.cos(angle);

            for (int i = 0; i < secArray.InternalArray4Experts.Length; i++)
                secArray.InternalArray4Experts[i] = 1.0f / secArray.InternalArray4Experts[i];

            return secArray;
        }

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<fcomplex> sec(ILArray<fcomplex> angle)
        {
            ILArray<fcomplex> secArray = ILNumerics.BuiltInFunctions.ILMath.cos(angle);

            for (int i = 0; i < secArray.InternalArray4Experts.Length; i++)
                secArray.InternalArray4Experts[i] = 1.0f / secArray.InternalArray4Experts[i];

            return secArray;
        }

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<double> sec(ILArray<int> arg)
        {
            return sec(ILMath.todouble(arg));
        }

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<double> sec(ILArray<byte> arg)
        {
            return sec(ILMath.todouble(arg));
        }

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<double> sec(ILArray<char> arg)
        {
            return sec(ILMath.todouble(arg));
        }

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<double> sec(ILArray<long> arg)
        {
            return sec(ILMath.todouble(arg));
        }

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<double> sec(ILArray<short> arg)
        {
            return sec(ILMath.todouble(arg));
        }


        //
        // --- Secant (argument in degrees) ---
        //

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<double> secd(ILArray<double> arg)
        {
            return sec(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<float> secd(ILArray<float> arg)
        {
            return sec(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<double> secd(ILArray<int> arg)
        {
            return sec(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<complex> secd(ILArray<complex> arg)
        {
            return sec(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<fcomplex> secd(ILArray<fcomplex> arg)
        {
            return sec(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<double> secd(ILArray<byte> arg)
        {
            return sec(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<double> secd(ILArray<char> arg)
        {
            return sec(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<double> secd(ILArray<long> arg)
        {
            return sec(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Secant.
        /// </summary>
        /// <param name="arg">Argument to return secant of</param>
        /// <returns>Secant of argument</returns>
        public static ILArray<double> secd(ILArray<short> arg)
        {
            return sec(arg * MLMath.pi / 180.0);
        }


        //
        // --- Cosecant ---
        //

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<double> csc(ILArray<double> angle)
        {
            ILArray<double> cosecArray = ILNumerics.BuiltInFunctions.ILMath.sin(angle);

            for (int i = 0; i < cosecArray.InternalArray4Experts.Length; i++)
                cosecArray.InternalArray4Experts[i] = 1.0 / cosecArray.InternalArray4Experts[i];

            return cosecArray;
        }

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<complex> csc(ILArray<complex> angle)
        {
            ILArray<complex> cosecArray = ILNumerics.BuiltInFunctions.ILMath.sin(angle);

            for (int i = 0; i < cosecArray.InternalArray4Experts.Length; i++)
                cosecArray.InternalArray4Experts[i] = 1.0 / cosecArray.InternalArray4Experts[i];

            return cosecArray;
        }

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<float> csc(ILArray<float> angle)
        {
            ILArray<float> cosecArray = ILNumerics.BuiltInFunctions.ILMath.sin(angle);

            for (int i = 0; i < cosecArray.InternalArray4Experts.Length; i++)
                cosecArray.InternalArray4Experts[i] = 1.0f / cosecArray.InternalArray4Experts[i];

            return cosecArray;
        }

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<fcomplex> csc(ILArray<fcomplex> angle)
        {
            ILArray<fcomplex> cosecArray = ILNumerics.BuiltInFunctions.ILMath.sin(angle);

            for (int i = 0; i < cosecArray.InternalArray4Experts.Length; i++)
                cosecArray.InternalArray4Experts[i] = 1.0f / cosecArray.InternalArray4Experts[i];

            return cosecArray;
        }

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<double> csc(ILArray<int> arg)
        {
            return csc(ILMath.todouble(arg));
        }

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<double> csc(ILArray<byte> arg)
        {
            return csc(ILMath.todouble(arg));
        }

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<double> csc(ILArray<char> arg)
        {
            return csc(ILMath.todouble(arg));
        }

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<double> csc(ILArray<long> arg)
        {
            return csc(ILMath.todouble(arg));
        }

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<double> csc(ILArray<short> arg)
        {
            return csc(ILMath.todouble(arg));
        }


        //
        // --- Cosecant (argument in degrees) ---
        //

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<double> cscd(ILArray<double> arg)
        {
            return csc(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<float> cscd(ILArray<float> arg)
        {
            return csc(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<double> cscd(ILArray<int> arg)
        {
            return csc(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<complex> cscd(ILArray<complex> arg)
        {
            return csc(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<fcomplex> cscd(ILArray<fcomplex> arg)
        {
            return csc(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<double> cscd(ILArray<byte> arg)
        {
            return csc(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<double> cscd(ILArray<char> arg)
        {
            return csc(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<double> cscd(ILArray<long> arg)
        {
            return csc(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cosecant.
        /// </summary>
        /// <param name="arg">Argument to return cosecant of</param>
        /// <returns>Cosecant of argument</returns>
        public static ILArray<double> cscd(ILArray<short> arg)
        {
            return csc(arg * MLMath.pi / 180.0);
        }


        //
        // --- Cotangent ---
        //

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<double> cot(ILArray<double> angle)
        {
            ILArray<double> cotArray = ILNumerics.BuiltInFunctions.ILMath.tan(angle);

            for (int i = 0; i < cotArray.InternalArray4Experts.Length; i++)
                cotArray.InternalArray4Experts[i] = 1.0 / cotArray.InternalArray4Experts[i];

            return cotArray;
        }

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<complex> cot(ILArray<complex> angle)
        {
            ILArray<complex> cotArray = ILNumerics.BuiltInFunctions.ILMath.tan(angle);

            for (int i = 0; i < cotArray.InternalArray4Experts.Length; i++)
                cotArray.InternalArray4Experts[i] = 1.0 / cotArray.InternalArray4Experts[i];

            return cotArray;
        }

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<float> cot(ILArray<float> angle)
        {
            ILArray<float> cotArray = ILNumerics.BuiltInFunctions.ILMath.tan(angle);

            for (int i = 0; i < cotArray.InternalArray4Experts.Length; i++)
                cotArray.InternalArray4Experts[i] = 1.0f / cotArray.InternalArray4Experts[i];

            return cotArray;
        }

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<fcomplex> cot(ILArray<fcomplex> angle)
        {
            ILArray<fcomplex> cotArray = ILNumerics.BuiltInFunctions.ILMath.tan(angle);

            for (int i = 0; i < cotArray.InternalArray4Experts.Length; i++)
                cotArray.InternalArray4Experts[i] = 1.0f / cotArray.InternalArray4Experts[i];

            return cotArray;
        }

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<double> cot(ILArray<int> arg)
        {
            return cot(ILMath.todouble(arg));
        }

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<double> cot(ILArray<byte> arg)
        {
            return cot(ILMath.todouble(arg));
        }

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<double> cot(ILArray<char> arg)
        {
            return cot(ILMath.todouble(arg));
        }

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<double> cot(ILArray<long> arg)
        {
            return cot(ILMath.todouble(arg));
        }

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<double> cot(ILArray<short> arg)
        {
            return cot(ILMath.todouble(arg));
        }


        //
        // --- Cotangent (argument in degrees) ---
        //

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<double> cotd(ILArray<double> arg)
        {
            return cot(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<float> cotd(ILArray<float> arg)
        {
            return cot(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<double> cotd(ILArray<int> arg)
        {
            return cot(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<complex> cotd(ILArray<complex> arg)
        {
            return cot(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<fcomplex> cotd(ILArray<fcomplex> arg)
        {
            return cot(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<double> cotd(ILArray<byte> arg)
        {
            return cot(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<double> cotd(ILArray<char> arg)
        {
            return cot(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<double> cotd(ILArray<long> arg)
        {
            return cot(arg * MLMath.pi / 180.0);
        }

        /// <summary>
        /// Cotangent.
        /// </summary>
        /// <param name="arg">Argument to return cotangent of</param>
        /// <returns>Cotangent of argument</returns>
        public static ILArray<double> cotd(ILArray<short> arg)
        {
            return cot(arg * MLMath.pi / 180.0);
        }


        //
        // --- Hyperbolic cotangent ---
        //

        /// <summary>
        /// Hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cotangent of</param>
        /// <returns>Hyperbolic cotangent of argument</returns>
        public static ILArray<double> coth(ILArray<double> arg)
        {
            ILArray<double> cothArray = new ILArray<double>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < cothArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                cothArray.InternalArray4Experts[i] = (Math.Exp(2 * a) + 1) / (Math.Exp(2 * a) - 1);
            }

            return cothArray;
        }

        /// <summary>
        /// Hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cotangent of</param>
        /// <returns>Hyperbolic cotangent of argument</returns>
        public static ILArray<complex> coth(ILArray<complex> arg)
        {
            ILArray<complex> cothArray = new ILArray<complex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < cothArray.InternalArray4Experts.Length; i++)
            {
                complex a = arg.InternalArray4Experts[i];
                cothArray.InternalArray4Experts[i] = (complex.Exp(2 * a) + 1) / (complex.Exp(2 * a) - 1);
            }

            return cothArray;
        }

        /// <summary>
        /// Hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cotangent of</param>
        /// <returns>Hyperbolic cotangent of argument</returns>
        public static ILArray<float> coth(ILArray<float> arg)
        {
            ILArray<float> cothArray = new ILArray<float>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < cothArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                cothArray.InternalArray4Experts[i] = (float)((Math.Exp(2 * a) + 1) / (Math.Exp(2 * a) - 1));
            }

            return cothArray;
        }

        /// <summary>
        /// Hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cotangent of</param>
        /// <returns>Hyperbolic cotangent of argument</returns>
        public static ILArray<fcomplex> coth(ILArray<fcomplex> arg)
        {
            ILArray<fcomplex> cothArray = new ILArray<fcomplex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < cothArray.InternalArray4Experts.Length; i++)
            {
                fcomplex a = arg.InternalArray4Experts[i];
                cothArray.InternalArray4Experts[i] = (fcomplex.Exp(2 * a) + 1) / (fcomplex.Exp(2 * a) - 1);
            }

            return cothArray;
        }

        /// <summary>
        /// Hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cotangent of</param>
        /// <returns>Hyperbolic cotangent of argument</returns>
        public static ILArray<double> coth(ILArray<int> arg)
        {
            return coth(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cotangent of</param>
        /// <returns>Hyperbolic cotangent of argument</returns>
        public static ILArray<double> coth(ILArray<byte> arg)
        {
            return coth(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cotangent of</param>
        /// <returns>Hyperbolic cotangent of argument</returns>
        public static ILArray<double> coth(ILArray<char> arg)
        {
            return coth(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cotangent of</param>
        /// <returns>Hyperbolic cotangent of argument</returns>
        public static ILArray<double> coth(ILArray<long> arg)
        {
            return coth(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cotangent of</param>
        /// <returns>Hyperbolic cotangent of argument</returns>
        public static ILArray<double> coth(ILArray<short> arg)
        {
            return coth(ILMath.todouble(arg));
        }


        //
        // --- Hyperbolic cosecant ---
        //

        /// <summary>
        /// Hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosecant of</param>
        /// <returns>Hyperbolic cosecant of argument</returns>
        public static ILArray<double> csch(ILArray<double> arg)
        {
            ILArray<double> cschArray = new ILArray<double>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < cschArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                cschArray.InternalArray4Experts[i] = 2.0 / (Math.Exp(a) - Math.Exp(-a));
            }

            return cschArray;
        }

        /// <summary>
        /// Hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosecant of</param>
        /// <returns>Hyperbolic cosecant of argument</returns>
        public static ILArray<complex> csch(ILArray<complex> arg)
        {
            ILArray<complex> cschArray = new ILArray<complex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < cschArray.InternalArray4Experts.Length; i++)
            {
                complex a = arg.InternalArray4Experts[i];
                cschArray.InternalArray4Experts[i] = 2.0 / (complex.Exp(a) - complex.Exp(-a));
            }

            return cschArray;
        }

        /// <summary>
        /// Hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosecant of</param>
        /// <returns>Hyperbolic cosecant of argument</returns>
        public static ILArray<float> csch(ILArray<float> arg)
        {
            ILArray<float> cschArray = new ILArray<float>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < cschArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                cschArray.InternalArray4Experts[i] = 2.0f / (float)(Math.Exp(a) - Math.Exp(-a));
            }

            return cschArray;
        }

        /// <summary>
        /// Hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosecant of</param>
        /// <returns>Hyperbolic cosecant of argument</returns>
        public static ILArray<fcomplex> csch(ILArray<fcomplex> arg)
        {
            ILArray<fcomplex> cschArray = new ILArray<fcomplex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < cschArray.InternalArray4Experts.Length; i++)
            {
                fcomplex a = arg.InternalArray4Experts[i];
                cschArray.InternalArray4Experts[i] = 2.0f / (fcomplex.Exp(a) - fcomplex.Exp(-a));
            }

            return cschArray;
        }

        /// <summary>
        /// Hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosecant of</param>
        /// <returns>Hyperbolic cosecant of argument</returns>
        public static ILArray<double> csch(ILArray<int> arg)
        {
            return csch(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosecant of</param>
        /// <returns>Hyperbolic cosecant of argument</returns>
        public static ILArray<double> csch(ILArray<byte> arg)
        {
            return csch(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosecant of</param>
        /// <returns>Hyperbolic cosecant of argument</returns>
        public static ILArray<double> csch(ILArray<char> arg)
        {
            return csch(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosecant of</param>
        /// <returns>Hyperbolic cosecant of argument</returns>
        public static ILArray<double> csch(ILArray<long> arg)
        {
            return csch(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic cosecant of</param>
        /// <returns>Hyperbolic cosecant of argument</returns>
        public static ILArray<double> csch(ILArray<short> arg)
        {
            return csch(ILMath.todouble(arg));
        }


        //
        // --- Hyperbolic secant ---
        //

        /// <summary>
        /// Hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic secant of</param>
        /// <returns>Hyperbolic secant of argument</returns>
        public static ILArray<double> sech(ILArray<double> arg)
        {
            ILArray<double> sechArray = new ILArray<double>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < sechArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                sechArray.InternalArray4Experts[i] = 2.0 / (Math.Exp(a) + Math.Exp(-a));
            }

            return sechArray;
        }

        /// <summary>
        /// Hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic secant of</param>
        /// <returns>Hyperbolic secant of argument</returns>
        public static ILArray<complex> sech(ILArray<complex> arg)
        {
            ILArray<complex> sechArray = new ILArray<complex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < sechArray.InternalArray4Experts.Length; i++)
            {
                complex a = arg.InternalArray4Experts[i];
                sechArray.InternalArray4Experts[i] = 2.0 / (complex.Exp(a) + complex.Exp(-a));
            }

            return sechArray;
        }

        /// <summary>
        /// Hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic secant of</param>
        /// <returns>Hyperbolic secant of argument</returns>
        public static ILArray<float> sech(ILArray<float> arg)
        {
            ILArray<float> sechArray = new ILArray<float>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < sechArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                sechArray.InternalArray4Experts[i] = 2.0f / (float)(Math.Exp(a) + Math.Exp(-a));
            }

            return sechArray;
        }

        /// <summary>
        /// Hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic secant of</param>
        /// <returns>Hyperbolic secant of argument</returns>
        public static ILArray<fcomplex> sech(ILArray<fcomplex> arg)
        {
            ILArray<fcomplex> sechArray = new ILArray<fcomplex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < sechArray.InternalArray4Experts.Length; i++)
            {
                fcomplex a = arg.InternalArray4Experts[i];
                sechArray.InternalArray4Experts[i] = 2.0 / (fcomplex.Exp(a) + fcomplex.Exp(-a));
            }

            return sechArray;
        }

        /// <summary>
        /// Hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic secant of</param>
        /// <returns>Hyperbolic secant of argument</returns>
        public static ILArray<double> sech(ILArray<int> arg)
        {
            return sech(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic secant of</param>
        /// <returns>Hyperbolic secant of argument</returns>
        public static ILArray<double> sech(ILArray<byte> arg)
        {
            return sech(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic secant of</param>
        /// <returns>Hyperbolic secant of argument</returns>
        public static ILArray<double> sech(ILArray<char> arg)
        {
            return sech(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic secant of</param>
        /// <returns>Hyperbolic secant of argument</returns>
        public static ILArray<double> sech(ILArray<long> arg)
        {
            return sech(ILMath.todouble(arg));
        }

        /// <summary>
        /// Hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return hyperbolic secant of</param>
        /// <returns>Hyperbolic secant of argument</returns>
        public static ILArray<double> sech(ILArray<short> arg)
        {
            return sech(ILMath.todouble(arg));
        }


        //
        // --- Hypotenuse length ---
        //

        /// <summary>
        /// Computes the hypotenuse given two perpendicular sides of a triangle.
        /// </summary>
        /// <param name="a">First side length</param>
        /// <param name="b">Second side length</param>
        /// <returns>Real array containing result</returns>
        public static ILArray<double> hypot(ILArray<double> a, ILBaseArray b)
        {
            ILArray<double> b2 = ILMath.todouble(b);
            ILArray<double> hypotArray = new ILArray<double>(a.Dimensions.ToIntArray());

            for (int i = 0; i < hypotArray.InternalArray4Experts.Length; i++)
            {
                double alen = a.InternalArray4Experts[i];
                double blen = b2.InternalArray4Experts[i];
                hypotArray.InternalArray4Experts[i] = Math.Sqrt(alen * alen + blen * blen);
            }

            return hypotArray;
        }

        /// <summary>
        /// Computes the hypotenuse given two perpendicular sides of a triangle.
        /// </summary>
        /// <param name="a">First side length</param>
        /// <param name="b">Second side length</param>
        /// <returns>Complex array containing result</returns>
        public static ILArray<complex> hypot(ILArray<complex> a, ILBaseArray b)
        {
            ILArray<complex> b2 = ILMath.tocomplex(b);
            ILArray<complex> hypotArray = new ILArray<complex>(a.Dimensions.ToIntArray());

            for (int i = 0; i < hypotArray.InternalArray4Experts.Length; i++)
            {
                complex alen = a.InternalArray4Experts[i];
                complex blen = b2.InternalArray4Experts[i];
                hypotArray.InternalArray4Experts[i] = complex.Sqrt(alen * alen + blen * blen);
            }

            return hypotArray;
        }

        /// <summary>
        /// Computes the hypotenuse given two perpendicular sides of a triangle.
        /// </summary>
        /// <param name="a">First side length</param>
        /// <param name="b">Second side length</param>
        /// <returns>Real array containing result</returns>
        public static ILArray<float> hypot(ILArray<float> a, ILBaseArray b)
        {
            ILArray<float> b2 = ILMath.tosingle(b);
            ILArray<float> hypotArray = new ILArray<float>(a.Dimensions.ToIntArray());

            for (int i = 0; i < hypotArray.InternalArray4Experts.Length; i++)
            {
                float alen = a.InternalArray4Experts[i];
                float blen = b2.InternalArray4Experts[i];
                hypotArray.InternalArray4Experts[i] = (float)Math.Sqrt(alen * alen + blen * blen);
            }

            return hypotArray;
        }

        /// <summary>
        /// Computes the hypotenuse given two perpendicular sides of a triangle.
        /// </summary>
        /// <param name="a">First side length</param>
        /// <param name="b">Second side length</param>
        /// <returns>Complex array containing result</returns>
        public static ILArray<fcomplex> hypot(ILArray<fcomplex> a, ILBaseArray b)
        {
            ILArray<fcomplex> b2 = ILMath.tofcomplex(b);
            ILArray<fcomplex> hypotArray = new ILArray<fcomplex>(a.Dimensions.ToIntArray());

            for (int i = 0; i < hypotArray.InternalArray4Experts.Length; i++)
            {
                fcomplex alen = a.InternalArray4Experts[i];
                fcomplex blen = b2.InternalArray4Experts[i];
                hypotArray.InternalArray4Experts[i] = fcomplex.Sqrt(alen * alen + blen * blen);
            }

            return hypotArray;
        }

        /// <summary>
        /// Computes the hypotenuse given two perpendicular sides of a triangle.
        /// </summary>
        /// <param name="a">First side length</param>
        /// <param name="b">Second side length</param>
        /// <returns>Real array containing result</returns>
        public static ILArray<double> hypot(ILArray<int> a, ILBaseArray b)
        {
            return hypot(ILMath.todouble(a), b);
        }

        /// <summary>
        /// Computes the hypotenuse given two perpendicular sides of a triangle.
        /// </summary>
        /// <param name="a">First side length</param>
        /// <param name="b">Second side length</param>
        /// <returns>Real array containing result</returns>
        public static ILArray<double> hypot(ILArray<byte> a, ILBaseArray b)
        {
            return hypot(ILMath.todouble(a), b);
        }

        /// <summary>
        /// Computes the hypotenuse given two perpendicular sides of a triangle.
        /// </summary>
        /// <param name="a">First side length</param>
        /// <param name="b">Second side length</param>
        /// <returns>Real array containing result</returns>
        public static ILArray<double> hypot(ILArray<char> a, ILBaseArray b)
        {
            return hypot(ILMath.todouble(a), b);
        }

        /// <summary>
        /// Computes the hypotenuse given two perpendicular sides of a triangle.
        /// </summary>
        /// <param name="a">First side length</param>
        /// <param name="b">Second side length</param>
        /// <returns>Real array containing result</returns>
        public static ILArray<double> hypot(ILArray<long> a, ILBaseArray b)
        {
            return hypot(ILMath.todouble(a), b);
        }

        /// <summary>
        /// Computes the hypotenuse given two perpendicular sides of a triangle.
        /// </summary>
        /// <param name="a">First side length</param>
        /// <param name="b">Second side length</param>
        /// <returns>Real array containing result</returns>
        public static ILArray<double> hypot(ILArray<short> a, ILBaseArray b)
        {
            return hypot(ILMath.todouble(a), b);
        }


        //
        // --- Inverse hyperbolic cosine ---
        //

        /// <summary>
        /// Inverse hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosine of</param>
        /// <returns>Inverse hyperbolic cosine of argument</returns>
        public static ILArray<double> acosh(ILArray<double> arg)
        {
            ILArray<double> acoshArray = new ILArray<double>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < acoshArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                acoshArray.InternalArray4Experts[i] = Math.Log(Math.Sqrt(a + 1) * Math.Sqrt(a - 1) + a);
            }

            return acoshArray;
        }

        /// <summary>
        /// Inverse hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosine of</param>
        /// <returns>Inverse hyperbolic cosine of argument</returns>
        public static ILArray<complex> acosh(ILArray<complex> arg)
        {
            ILArray<complex> acoshArray = new ILArray<complex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < acoshArray.InternalArray4Experts.Length; i++)
            {
                complex a = arg.InternalArray4Experts[i];
                acoshArray.InternalArray4Experts[i] = complex.Log(complex.Sqrt(a + 1) * complex.Sqrt(a - 1) + a);
            }

            return acoshArray;
        }

        /// <summary>
        /// Inverse hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosine of</param>
        /// <returns>Inverse hyperbolic cosine of argument</returns>
        public static ILArray<float> acosh(ILArray<float> arg)
        {
            ILArray<float> acoshArray = new ILArray<float>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < acoshArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                acoshArray.InternalArray4Experts[i] = (float)Math.Log(Math.Sqrt(a + 1) * Math.Sqrt(a - 1) + a);
            }

            return acoshArray;
        }

        /// <summary>
        /// Inverse hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosine of</param>
        /// <returns>Inverse hyperbolic cosine of argument</returns>
        public static ILArray<fcomplex> acosh(ILArray<fcomplex> arg)
        {
            ILArray<fcomplex> acoshArray = new ILArray<fcomplex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < acoshArray.InternalArray4Experts.Length; i++)
            {
                fcomplex a = arg.InternalArray4Experts[i];
                acoshArray.InternalArray4Experts[i] = fcomplex.Log(fcomplex.Sqrt(a + 1) * fcomplex.Sqrt(a - 1) + a);
            }

            return acoshArray;
        }

        /// <summary>
        /// Inverse hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosine of</param>
        /// <returns>Inverse hyperbolic cosine of argument</returns>
        public static ILArray<double> acosh(ILArray<int> arg)
        {
            return acosh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosine of</param>
        /// <returns>Inverse hyperbolic cosine of argument</returns>
        public static ILArray<double> acosh(ILArray<byte> arg)
        {
            return acosh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosine of</param>
        /// <returns>Inverse hyperbolic cosine of argument</returns>
        public static ILArray<double> acosh(ILArray<char> arg)
        {
            return acosh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosine of</param>
        /// <returns>Inverse hyperbolic cosine of argument</returns>
        public static ILArray<double> acosh(ILArray<long> arg)
        {
            return acosh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic cosine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosine of</param>
        /// <returns>Inverse hyperbolic cosine of argument</returns>
        public static ILArray<double> acosh(ILArray<short> arg)
        {
            return acosh(ILMath.todouble(arg));
        }


        //
        // --- Inverse hyperbolic sine ---
        //

        /// <summary>
        /// Inverse hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic sine of</param>
        /// <returns>Inverse hyperbolic sine of argument</returns>
        public static ILArray<double> asinh(ILArray<double> arg)
        {
            ILArray<double> asinhArray = new ILArray<double>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < asinhArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                asinhArray.InternalArray4Experts[i] = Math.Log(Math.Sqrt(a * a + 1) + a);
            }

            return asinhArray;
        }

        /// <summary>
        /// Inverse hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic sine of</param>
        /// <returns>Inverse hyperbolic sine of argument</returns>
        public static ILArray<complex> asinh(ILArray<complex> arg)
        {
            ILArray<complex> asinhArray = new ILArray<complex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < asinhArray.InternalArray4Experts.Length; i++)
            {
                complex a = arg.InternalArray4Experts[i];
                asinhArray.InternalArray4Experts[i] = complex.Log(complex.Sqrt(a * a + 1) + a);
            }

            return asinhArray;
        }

        /// <summary>
        /// Inverse hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic sine of</param>
        /// <returns>Inverse hyperbolic sine of argument</returns>
        public static ILArray<float> asinh(ILArray<float> arg)
        {
            ILArray<float> asinhArray = new ILArray<float>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < asinhArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                asinhArray.InternalArray4Experts[i] = (float)Math.Log(Math.Sqrt(a * a + 1) + a);
            }

            return asinhArray;
        }

        /// <summary>
        /// Inverse hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic sine of</param>
        /// <returns>Inverse hyperbolic sine of argument</returns>
        public static ILArray<fcomplex> asinh(ILArray<fcomplex> arg)
        {
            ILArray<fcomplex> asinhArray = new ILArray<fcomplex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < asinhArray.InternalArray4Experts.Length; i++)
            {
                fcomplex a = arg.InternalArray4Experts[i];
                asinhArray.InternalArray4Experts[i] = fcomplex.Log(fcomplex.Sqrt(a * a + 1) + a);
            }

            return asinhArray;
        }

        /// <summary>
        /// Inverse hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic sine of</param>
        /// <returns>Inverse hyperbolic sine of argument</returns>
        public static ILArray<double> asinh(ILArray<int> arg)
        {
            return asinh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic sine of</param>
        /// <returns>Inverse hyperbolic sine of argument</returns>
        public static ILArray<double> asinh(ILArray<byte> arg)
        {
            return asinh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic sine of</param>
        /// <returns>Inverse hyperbolic sine of argument</returns>
        public static ILArray<double> asinh(ILArray<char> arg)
        {
            return asinh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic sine of</param>
        /// <returns>Inverse hyperbolic sine of argument</returns>
        public static ILArray<double> asinh(ILArray<long> arg)
        {
            return asinh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic sine.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic sine of</param>
        /// <returns>Inverse hyperbolic sine of argument</returns>
        public static ILArray<double> asinh(ILArray<short> arg)
        {
            return asinh(ILMath.todouble(arg));
        }


        //
        // --- Inverse hyperbolic tangent ---
        //

        /// <summary>
        /// Inverse hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic tangent of</param>
        /// <returns>Inverse hyperbolic tangent of argument</returns>
        public static ILArray<double> atanh(ILArray<double> arg)
        {
            ILArray<double> atanhArray = new ILArray<double>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < atanhArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                atanhArray.InternalArray4Experts[i] = 0.5 * (Math.Log(a + 1) - Math.Log(1 - a));
            }

            return atanhArray;
        }

        /// <summary>
        /// Inverse hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic tangent of</param>
        /// <returns>Inverse hyperbolic tangent of argument</returns>
        public static ILArray<complex> atanh(ILArray<complex> arg)
        {
            ILArray<complex> atanhArray = new ILArray<complex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < atanhArray.InternalArray4Experts.Length; i++)
            {
                complex a = arg.InternalArray4Experts[i];
                atanhArray.InternalArray4Experts[i] = 0.5 * (complex.Log(a + 1) - complex.Log(1 - a));
            }

            return atanhArray;
        }

        /// <summary>
        /// Inverse hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic tangent of</param>
        /// <returns>Inverse hyperbolic tangent of argument</returns>
        public static ILArray<float> atanh(ILArray<float> arg)
        {
            ILArray<float> atanhArray = new ILArray<float>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < atanhArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                atanhArray.InternalArray4Experts[i] = 0.5f * (float)(Math.Log(a + 1) - Math.Log(1 - a));
            }

            return atanhArray;
        }

        /// <summary>
        /// Inverse hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic tangent of</param>
        /// <returns>Inverse hyperbolic tangent of argument</returns>
        public static ILArray<fcomplex> atanh(ILArray<fcomplex> arg)
        {
            ILArray<fcomplex> atanhArray = new ILArray<fcomplex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < atanhArray.InternalArray4Experts.Length; i++)
            {
                fcomplex a = arg.InternalArray4Experts[i];
                atanhArray.InternalArray4Experts[i] = 0.5f * (fcomplex.Log(a + 1) - fcomplex.Log(1 - a));
            }

            return atanhArray;
        }

        /// <summary>
        /// Inverse hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic tangent of</param>
        /// <returns>Inverse hyperbolic tangent of argument</returns>
        public static ILArray<double> atanh(ILArray<int> arg)
        {
            return atanh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic tangent of</param>
        /// <returns>Inverse hyperbolic tangent of argument</returns>
        public static ILArray<double> atanh(ILArray<byte> arg)
        {
            return atanh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic tangent of</param>
        /// <returns>Inverse hyperbolic tangent of argument</returns>
        public static ILArray<double> atanh(ILArray<char> arg)
        {
            return atanh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic tangent of</param>
        /// <returns>Inverse hyperbolic tangent of argument</returns>
        public static ILArray<double> atanh(ILArray<long> arg)
        {
            return atanh(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic tangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic tangent of</param>
        /// <returns>Inverse hyperbolic tangent of argument</returns>
        public static ILArray<double> atanh(ILArray<short> arg)
        {
            return atanh(ILMath.todouble(arg));
        }


        //
        // --- Inverse cotangent ---
        //

        /// <summary>
        /// Computes the inverse cotangent of the supplied real argument.
        /// </summary>
        /// <param name="arg">Real argument array</param>
        /// <returns>Real array containing result</returns>
        public static ILArray<double> acot(ILArray<double> arg)
        {
            ILArray<double> atanArray = new ILArray<double>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < atanArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                atanArray.InternalArray4Experts[i] = Math.Atan(1.0 / a);
            }

            return atanArray;
        }

        /// <summary>
        /// Computes the inverse cotangent of the supplied complex argument.
        /// </summary>
        /// <param name="arg">Complex argument array</param>
        /// <returns>Complex array containing result</returns>
        public static ILArray<complex> acot(ILArray<complex> arg)
        {
            ILArray<complex> atanArray = new ILArray<complex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < atanArray.InternalArray4Experts.Length; i++)
            {
                complex a = arg.InternalArray4Experts[i];
                atanArray.InternalArray4Experts[i] = complex.Atan(1.0 / a);
            }

            return atanArray;
        }

        /// <summary>
        /// Computes the inverse cotangent of the supplied real argument.
        /// </summary>
        /// <param name="arg">Real argument array</param>
        /// <returns>Real array containing result</returns>
        public static ILArray<float> acot(ILArray<float> arg)
        {
            ILArray<float> atanArray = new ILArray<float>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < atanArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                atanArray.InternalArray4Experts[i] = (float)Math.Atan(1.0 / a);
            }

            return atanArray;
        }

        /// <summary>
        /// Computes the inverse cotangent of the supplied complex argument.
        /// </summary>
        /// <param name="arg">Complex argument array</param>
        /// <returns>Complex array containing result</returns>
        public static ILArray<fcomplex> acot(ILArray<fcomplex> arg)
        {
            ILArray<fcomplex> atanArray = new ILArray<fcomplex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < atanArray.InternalArray4Experts.Length; i++)
            {
                fcomplex a = arg.InternalArray4Experts[i];
                atanArray.InternalArray4Experts[i] = fcomplex.Atan(1.0 / a);
            }

            return atanArray;
        }

        /// <summary>
        /// Inverse cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse cotangent of</param>
        /// <returns>Inverse cotangent of argument</returns>
        public static ILArray<double> acot(ILArray<int> arg)
        {
            return acot(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse cotangent of</param>
        /// <returns>Inverse cotangent of argument</returns>
        public static ILArray<double> acot(ILArray<byte> arg)
        {
            return acot(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse cotangent of</param>
        /// <returns>Inverse cotangent of argument</returns>
        public static ILArray<double> acot(ILArray<char> arg)
        {
            return acot(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse cotangent of</param>
        /// <returns>Inverse cotangent of argument</returns>
        public static ILArray<double> acot(ILArray<long> arg)
        {
            return acot(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse cotangent of</param>
        /// <returns>Inverse cotangent of argument</returns>
        public static ILArray<double> acot(ILArray<short> arg)
        {
            return acot(ILMath.todouble(arg));
        }


        //
        // --- Inverse hyperbolic cotangent ---
        //

        /// <summary>
        /// Inverse hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cotangent of</param>
        /// <returns>Inverse hyperbolic cotangent of argument</returns>
        public static ILArray<double> acoth(ILArray<double> arg)
        {
            ILArray<double> acothArray = new ILArray<double>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < acothArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                acothArray.InternalArray4Experts[i] = 0.5 * (Math.Log(1 + 1 / a) - Math.Log(1 - 1 / a));
            }

            return acothArray;
        }

        /// <summary>
        /// Inverse hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cotangent of</param>
        /// <returns>Inverse hyperbolic cotangent of argument</returns>
        public static ILArray<complex> acoth(ILArray<complex> arg)
        {
            ILArray<complex> acothArray = new ILArray<complex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < acothArray.InternalArray4Experts.Length; i++)
            {
                complex a = arg.InternalArray4Experts[i];
                acothArray.InternalArray4Experts[i] = 0.5 * (complex.Log(1 + 1 / a) - complex.Log(1 - 1 / a));
            }

            return acothArray;
        }

        /// <summary>
        /// Inverse hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cotangent of</param>
        /// <returns>Inverse hyperbolic cotangent of argument</returns>
        public static ILArray<float> acoth(ILArray<float> arg)
        {
            ILArray<float> acothArray = new ILArray<float>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < acothArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                acothArray.InternalArray4Experts[i] = 0.5f * (float)(Math.Log(1 + 1 / a) - Math.Log(1 - 1 / a));
            }

            return acothArray;
        }

        /// <summary>
        /// Inverse hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cotangent of</param>
        /// <returns>Inverse hyperbolic cotangent of argument</returns>
        public static ILArray<fcomplex> acoth(ILArray<fcomplex> arg)
        {
            ILArray<fcomplex> acothArray = new ILArray<fcomplex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < acothArray.InternalArray4Experts.Length; i++)
            {
                fcomplex a = arg.InternalArray4Experts[i];
                acothArray.InternalArray4Experts[i] = 0.5 * (fcomplex.Log(1 + 1 / a) - fcomplex.Log(1 - 1 / a));
            }

            return acothArray;
        }

        /// <summary>
        /// Inverse hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cotangent of</param>
        /// <returns>Inverse hyperbolic cotangent of argument</returns>
        public static ILArray<double> acoth(ILArray<int> arg)
        {
            return acoth(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cotangent of</param>
        /// <returns>Inverse hyperbolic cotangent of argument</returns>
        public static ILArray<double> acoth(ILArray<byte> arg)
        {
            return acoth(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cotangent of</param>
        /// <returns>Inverse hyperbolic cotangent of argument</returns>
        public static ILArray<double> acoth(ILArray<char> arg)
        {
            return acoth(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cotangent of</param>
        /// <returns>Inverse hyperbolic cotangent of argument</returns>
        public static ILArray<double> acoth(ILArray<long> arg)
        {
            return acoth(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic cotangent.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cotangent of</param>
        /// <returns>Inverse hyperbolic cotangent of argument</returns>
        public static ILArray<double> acoth(ILArray<short> arg)
        {
            return acoth(ILMath.todouble(arg));
        }


        //
        // --- Inverse cosecant ---
        //

        /// <summary>
        /// Computes the inverse cosecant of the supplied real argument.
        /// </summary>
        /// <param name="arg">Real argument array</param>
        /// <returns>Real array containing result</returns>
        public static ILArray<double> acsc(ILArray<double> arg)
        {
            ILArray<double> acscArray = new ILArray<double>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < acscArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                acscArray.InternalArray4Experts[i] = Math.Asin(1.0 / a);
            }

            return acscArray;
        }

        /// <summary>
        /// Computes the inverse cosecant of the supplied complex argument.
        /// </summary>
        /// <param name="arg">Complex argument array</param>
        /// <returns>Complex array containing result</returns>
        public static ILArray<complex> acsc(ILArray<complex> arg)
        {
            ILArray<complex> acscArray = new ILArray<complex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < acscArray.InternalArray4Experts.Length; i++)
            {
                complex a = arg.InternalArray4Experts[i];
                acscArray.InternalArray4Experts[i] = complex.Asin(1.0 / a);
            }

            return acscArray;
        }

        /// <summary>
        /// Computes the inverse cosecant of the supplied real argument.
        /// </summary>
        /// <param name="arg">Real argument array</param>
        /// <returns>Real array containing result</returns>
        public static ILArray<float> acsc(ILArray<float> arg)
        {
            ILArray<float> acscArray = new ILArray<float>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < acscArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                acscArray.InternalArray4Experts[i] = (float)Math.Asin(1.0 / a);
            }

            return acscArray;
        }

        /// <summary>
        /// Computes the inverse cosecant of the supplied complex argument.
        /// </summary>
        /// <param name="arg">Complex argument array</param>
        /// <returns>Complex array containing result</returns>
        public static ILArray<fcomplex> acsc(ILArray<fcomplex> arg)
        {
            ILArray<fcomplex> acscArray = new ILArray<fcomplex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < acscArray.InternalArray4Experts.Length; i++)
            {
                fcomplex a = arg.InternalArray4Experts[i];
                acscArray.InternalArray4Experts[i] = fcomplex.Asin(1.0 / a);
            }

            return acscArray;
        }

        /// <summary>
        /// Inverse cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosecant of</param>
        /// <returns>Inverse cosecant of argument</returns>
        public static ILArray<double> acsc(ILArray<int> arg)
        {
            return acsc(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosecant of</param>
        /// <returns>Inverse cosecant of argument</returns>
        public static ILArray<double> acsc(ILArray<byte> arg)
        {
            return acsc(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosecant of</param>
        /// <returns>Inverse cosecant of argument</returns>
        public static ILArray<double> acsc(ILArray<char> arg)
        {
            return acsc(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosecant of</param>
        /// <returns>Inverse cosecant of argument</returns>
        public static ILArray<double> acsc(ILArray<long> arg)
        {
            return acsc(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse cosecant of</param>
        /// <returns>Inverse cosecant of argument</returns>
        public static ILArray<double> acsc(ILArray<short> arg)
        {
            return acsc(ILMath.todouble(arg));
        }


        //
        // --- Inverse secant ---
        //

        /// <summary>
        /// Computes the inverse secant of the supplied real argument.
        /// </summary>
        /// <param name="arg">Real argument array</param>
        /// <returns>Real array containing result</returns>
        public static ILArray<double> asec(ILArray<double> arg)
        {
            ILArray<double> asecArray = new ILArray<double>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < asecArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                asecArray.InternalArray4Experts[i] = Math.Acos(1.0 / a);
            }

            return asecArray;
        }

        /// <summary>
        /// Computes the inverse secant of the supplied complex argument.
        /// </summary>
        /// <param name="arg">Complex argument array</param>
        /// <returns>Complex array containing result</returns>
        public static ILArray<complex> asec(ILArray<complex> arg)
        {
            ILArray<complex> asecArray = new ILArray<complex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < asecArray.InternalArray4Experts.Length; i++)
            {
                complex a = arg.InternalArray4Experts[i];
                asecArray.InternalArray4Experts[i] = complex.Acos(1.0 / a);
            }

            return asecArray;
        }

        /// <summary>
        /// Computes the inverse secant of the supplied complex argument.
        /// </summary>
        /// <param name="arg">Complex argument array</param>
        /// <returns>Complex array containing result</returns>
        public static ILArray<float> asec(ILArray<float> arg)
        {
            ILArray<float> asecArray = new ILArray<float>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < asecArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                asecArray.InternalArray4Experts[i] = (float)Math.Acos(1.0 / a);
            }

            return asecArray;
        }

        /// <summary>
        /// Computes the inverse secant of the supplied complex argument.
        /// </summary>
        /// <param name="arg">Complex argument array</param>
        /// <returns>Complex array containing result</returns>
        public static ILArray<fcomplex> asec(ILArray<fcomplex> arg)
        {
            ILArray<fcomplex> asecArray = new ILArray<fcomplex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < asecArray.InternalArray4Experts.Length; i++)
            {
                fcomplex a = arg.InternalArray4Experts[i];
                asecArray.InternalArray4Experts[i] = fcomplex.Acos(1.0 / a);
            }

            return asecArray;
        }

        /// <summary>
        /// Computes the inverse secant of the supplied complex argument.
        /// </summary>
        /// <param name="arg">Complex argument array</param>
        /// <returns>Complex array containing result</returns>
        public static ILArray<double> asec(ILArray<int> arg)
        {
            return asec(ILMath.todouble(arg));
        }

        /// <summary>
        /// Computes the inverse secant of the supplied complex argument.
        /// </summary>
        /// <param name="arg">Complex argument array</param>
        /// <returns>Complex array containing result</returns>
        public static ILArray<double> asec(ILArray<byte> arg)
        {
            return asec(ILMath.todouble(arg));
        }

        /// <summary>
        /// Computes the inverse secant of the supplied complex argument.
        /// </summary>
        /// <param name="arg">Complex argument array</param>
        /// <returns>Complex array containing result</returns>
        public static ILArray<double> asec(ILArray<char> arg)
        {
            return asec(ILMath.todouble(arg));
        }

        /// <summary>
        /// Computes the inverse secant of the supplied complex argument.
        /// </summary>
        /// <param name="arg">Complex argument array</param>
        /// <returns>Complex array containing result</returns>
        public static ILArray<double> asec(ILArray<long> arg)
        {
            return asec(ILMath.todouble(arg));
        }

        /// <summary>
        /// Computes the inverse secant of the supplied complex argument.
        /// </summary>
        /// <param name="arg">Complex argument array</param>
        /// <returns>Complex array containing result</returns>
        public static ILArray<double> asec(ILArray<short> arg)
        {
            return asec(ILMath.todouble(arg));
        }


        //
        // --- Inverse hyperbolic cosecant ---
        //

        /// <summary>
        /// Inverse hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosecant of</param>
        /// <returns>Inverse hyperbolic cosecant of argument</returns>
        public static ILArray<double> acsch(ILArray<double> arg)
        {
            ILArray<double> acschArray = new ILArray<double>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < acschArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                acschArray.InternalArray4Experts[i] = Math.Log(Math.Sqrt(1.0 / (a * a) + 1.0) + 1.0 / a);
            }

            return acschArray;
        }

        /// <summary>
        /// Inverse hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosecant of</param>
        /// <returns>Inverse hyperbolic cosecant of argument</returns>
        public static ILArray<complex> acsch(ILArray<complex> arg)
        {
            ILArray<complex> acschArray = new ILArray<complex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < acschArray.InternalArray4Experts.Length; i++)
            {
                complex a = arg.InternalArray4Experts[i];
                acschArray.InternalArray4Experts[i] = complex.Log(complex.Sqrt(1.0 / (a * a) + 1.0) + 1.0 / a);
            }

            return acschArray;
        }

        /// <summary>
        /// Inverse hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosecant of</param>
        /// <returns>Inverse hyperbolic cosecant of argument</returns>
        public static ILArray<float> acsch(ILArray<float> arg)
        {
            ILArray<float> acschArray = new ILArray<float>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < acschArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                acschArray.InternalArray4Experts[i] = (float)Math.Log(Math.Sqrt(1.0 / (a * a) + 1.0) + 1.0 / a);
            }

            return acschArray;
        }

        /// <summary>
        /// Inverse hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosecant of</param>
        /// <returns>Inverse hyperbolic cosecant of argument</returns>
        public static ILArray<fcomplex> acsch(ILArray<fcomplex> arg)
        {
            ILArray<fcomplex> acschArray = new ILArray<fcomplex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < acschArray.InternalArray4Experts.Length; i++)
            {
                fcomplex a = arg.InternalArray4Experts[i];
                acschArray.InternalArray4Experts[i] = fcomplex.Log(fcomplex.Sqrt(1.0 / (a * a) + 1.0) + 1.0 / a);
            }

            return acschArray;
        }

        /// <summary>
        /// Inverse hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosecant of</param>
        /// <returns>Inverse hyperbolic cosecant of argument</returns>
        public static ILArray<double> acsch(ILArray<int> arg)
        {
            return acsch(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosecant of</param>
        /// <returns>Inverse hyperbolic cosecant of argument</returns>
        public static ILArray<double> acsch(ILArray<byte> arg)
        {
            return acsch(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosecant of</param>
        /// <returns>Inverse hyperbolic cosecant of argument</returns>
        public static ILArray<double> acsch(ILArray<char> arg)
        {
            return acsch(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosecant of</param>
        /// <returns>Inverse hyperbolic cosecant of argument</returns>
        public static ILArray<double> acsch(ILArray<long> arg)
        {
            return acsch(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic cosecant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic cosecant of</param>
        /// <returns>Inverse hyperbolic cosecant of argument</returns>
        public static ILArray<double> acsch(ILArray<short> arg)
        {
            return acsch(ILMath.todouble(arg));
        }


        //
        // --- Inverse hyperbolic secant ---
        //

        /// <summary>
        /// Inverse hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic secant of</param>
        /// <returns>Inverse hyperbolic secant of argument</returns>
        public static ILArray<double> asech(ILArray<double> arg)
        {
            ILArray<double> asechArray = new ILArray<double>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < asechArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                asechArray.InternalArray4Experts[i] = Math.Log(Math.Sqrt(1.0 / a - 1.0) * Math.Sqrt(1.0 / a + 1.0) + 1.0 / a);
            }

            return asechArray;
        }

        /// <summary>
        /// Inverse hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic secant of</param>
        /// <returns>Inverse hyperbolic secant of argument</returns>
        public static ILArray<complex> asech(ILArray<complex> arg)
        {
            ILArray<complex> asechArray = new ILArray<complex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < asechArray.InternalArray4Experts.Length; i++)
            {
                complex a = arg.InternalArray4Experts[i];
                asechArray.InternalArray4Experts[i] = complex.Log(complex.Sqrt(1.0 / a - 1.0) * complex.Sqrt(1.0 / a + 1.0) + 1.0 / a);
            }

            return asechArray;
        }

        /// <summary>
        /// Inverse hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic secant of</param>
        /// <returns>Inverse hyperbolic secant of argument</returns>
        public static ILArray<float> asech(ILArray<float> arg)
        {
            ILArray<float> asechArray = new ILArray<float>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < asechArray.InternalArray4Experts.Length; i++)
            {
                double a = arg.InternalArray4Experts[i];
                asechArray.InternalArray4Experts[i] = (float)Math.Log(Math.Sqrt(1.0 / a - 1.0) * Math.Sqrt(1.0 / a + 1.0) + 1.0 / a);
            }

            return asechArray;
        }

        /// <summary>
        /// Inverse hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic secant of</param>
        /// <returns>Inverse hyperbolic secant of argument</returns>
        public static ILArray<fcomplex> asech(ILArray<fcomplex> arg)
        {
            ILArray<fcomplex> asechArray = new ILArray<fcomplex>(arg.Dimensions.ToIntArray());

            for (int i = 0; i < asechArray.InternalArray4Experts.Length; i++)
            {
                fcomplex a = arg.InternalArray4Experts[i];
                asechArray.InternalArray4Experts[i] = fcomplex.Log(fcomplex.Sqrt(1.0 / a - 1.0) * fcomplex.Sqrt(1.0 / a + 1.0) + 1.0 / a);
            }

            return asechArray;
        }

        /// <summary>
        /// Inverse hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic secant of</param>
        /// <returns>Inverse hyperbolic secant of argument</returns>
        public static ILArray<double> asech(ILArray<int> arg)
        {
            return asech(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic secant of</param>
        /// <returns>Inverse hyperbolic secant of argument</returns>
        public static ILArray<double> asech(ILArray<byte> arg)
        {
            return asech(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic secant of</param>
        /// <returns>Inverse hyperbolic secant of argument</returns>
        public static ILArray<double> asech(ILArray<char> arg)
        {
            return asech(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic secant of</param>
        /// <returns>Inverse hyperbolic secant of argument</returns>
        public static ILArray<double> asech(ILArray<long> arg)
        {
            return asech(ILMath.todouble(arg));
        }

        /// <summary>
        /// Inverse hyperbolic secant.
        /// </summary>
        /// <param name="arg">Argument to return inverse hyperbolic secant of</param>
        /// <returns>Inverse hyperbolic secant of argument</returns>
        public static ILArray<double> asech(ILArray<short> arg)
        {
            return asech(ILMath.todouble(arg));
        }
    }
}
